JMExecJNIMethodInContext
Executes a nonstatic Java method in a given AWT context thread using the Java Native Interface (JNI).
OSStatus JMExecJNIMethodInContext ( JMAWTContextRef context, JNIEnv* env, jobject objref, jmethodID methodID, UInt32 argCount, jvalue args[]);
context
- The AWT context in whose thread you want the method to execute.
env
- A pointer to the current
JNIEnv
data structure.objref
- A pointer to the Java object that contains the method you want to call.
methodID
- The ID of the method.
argCount
- The number of arguments in the method.
args[]
- The argument list.
- function result
- A result code; see "JManager Result Codes".
DISCUSSION
Before calling this function, you must call theJMGetCurrentEnv
function to get theJNIEnv
pointer.If you want to execute a static Java method (that is, one that is not local to an object) using the JNI, you must call the
JMExecJNIStaticMethodInContext
function instead.You can find documentation on the Java Native Interface (JNI) at the Web page